import { getRequest } from "../baseRequest";
import request from "@/utils/request";
// 同步企微
export const syncWechatCpRequest = () => getRequest("/organization/syncCpWx");

export function pageUser(query: any, silent?: boolean) {
  return request({
    url: "/organization/user/page",
    method: "get",
    params: query,
    headers: {
      silent: silent
    }
  });
}

// 导出一个名为 pageRole 的函数，该函数用于获取角色分页数据
export function pageRole(query: any) {
  return request({
    url: "/organization/role/page",
    method: "get",
    params: query
  });
}

// 导出一个名为 pageRole 的函数，该函数用于获取角色分页数据
export function pagePost(query: any) {
  return request({
    url: "/organization/post/page",
    method: "get",
    params: query
  });
}

export const getRoleList = (query: any) => getRequest("/organization/role/list", query);

export const getDeptTree = (query: any) => getRequest("/organization/dept/tree", query);
